package com.peas.platform.module.icims.base.sys.controller.vo;

import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.common.core.vo.BaseVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.*;

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel("附件记录")
public class AttachmentVo extends BaseVo {

    @Comment(value = "系统")
    @ApiModelProperty(value = "系统")
    @Size(max = 100, message = "系统不能超过100个字符")
    private String system;

    @Comment(value = "系统名称")
    @ApiModelProperty(value = "系统名称")
    @Size(max = 100, message = "系统名称不能超过100个字符")
    private String systemName;

    @Comment(value = "服务")
    @ApiModelProperty(value = "服务")
    @Size(max = 100, message = "服务不能超过100个字符")
    private String service;

    @Comment(value = "服务名")
    @ApiModelProperty(value = "服务名")
    @Size(max = 100, message = "服务名不能超过100个字符")
    private String serviceName;

    @Comment(value = "文件类型", dictType = "FileType")
    @ApiModelProperty(value = "文件类型", notes = "字典取值:FileType")
    @Size(max = 20, message = "文件类型不能超过20个字符")
    private String fileType;

    // 以MD5值重新命名
    @Comment(value = "附件存储名称")
    @ApiModelProperty(value = "附件存储名称")
    @Size(max = 200, message = "附件存储名称不能超过200个字符")
    private String fileName;

    @Comment(value = "附件MD5值")
    @ApiModelProperty(value = "附件MD5值")
    @Size(max = 50, message = "附件MD5值不能超过50个字符")
    private String md5;

    @Comment(value = "附件大小(字节)")
    @ApiModelProperty(value = "附件大小(字节)")
    private Long size;

    // 【用户表】
    @Comment(value = "附件上传人")
    @ApiModelProperty(value = "附件上传人")
    private Long uploader;

    // local本地存储，minio，oss
    @Comment(value = "附件存储方式")
    @ApiModelProperty(value = "附件存储方式")
    @Size(max = 20, message = "附件存储方式不能超过20个字符")
    private String storage;

    @Comment(value = "附件存储桶")
    @ApiModelProperty(value = "附件存储桶")
    @Size(max = 100, message = "附件存储桶不能超过100个字符")
    private String bucket;

    @Comment(value = "存储路径")
    @ApiModelProperty(value = "存储路径")
    @Size(max = 200, message = "存储路径不能超过200个字符")
    private String path;

    @Comment(value = "原始文件名")
    @ApiModelProperty(value = "原始文件名")
    @Size(max = 200, message = "原始文件名不能超过200个字符")
    private String original;

    @Comment(value = "附件URL")
    @ApiModelProperty(value = "附件URL")
    @Size(max = 500, message = "附件URL不能超过500个字符")
    private String url;

}
